﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using POSSystem.BLL;
using WebUI.Controls;

namespace WebUI.EditPages
{
    public partial class RepairHist : BasePage
    {
        public const string IMEI = "imei";
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
            if (!IsPostBack)
            {
                View_RepairJobs jbs = View_RepairJobs.GetJobsByIMEI(string.IsNullOrEmpty(Request.QueryString[IMEI]) ? "" : Request.QueryString[IMEI]);
                jbs.Sort = View_RepairJobs.ColumnNames.CreatedDate + " desc";
                lstRepair.Jobs = jbs;
                lstRepair.SortExpression = View_RepairJobs.ColumnNames.CreatedDate;
                lstRepair.SortDirection = BaseListControl.SORT_DESC;
                lstRepair.AllowUpdating = false;
                lstRepair.Refresh();
            }
        }
    }
}